<?php
echo "计算输入的两个整数加减乘除的结果\n";
echo "计算输入的两个整数，用英语逗号分隔：\n";
$count = fscanf(STDIN, "%d,%d%s", $a, $b,$other);
var_dump($count,$a,$b,$other);
if ($count > 2) {
    echo "请不要输入乱七八糟的东西~\n";
} elseif ($count < 2) {
    echo "请按格式输入数据\n";
} else {
    $he = $a + $b;
    $cha = $a - $b;
    echo "$a + $b = $he\n";
    echo "$a - $b = $cha\n";
}